package com.tg.paw.common.mq.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.tg.paw.common.entity.BaseEntity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * <p>
 * 消息
 * </p>
 *
 * @author Rubble
 * @since 2020-06-19
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("mq_message_log")
@ApiModel(value="MqMessageLog对象", description="消息")
public class MqMessageLog extends BaseEntity {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "log_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long logId;

    @ApiModelProperty(value = "消息id")
    @TableField("message_id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long messageId;

    @ApiModelProperty(value = "消息uid")
    @TableField("uid")
    private String uid;

    @ApiModelProperty(value = "节点")
    @TableField("virtual_host")
    private String virtualHost;

    @ApiModelProperty(value = "交换机")
    @TableField("exchange")
    private String exchange;

    @ApiModelProperty(value = "队列")
    @TableField("queue")
    private String queue;

    @ApiModelProperty(value = "路由键")
    @TableField("routing_key")
    private String routingKey;

    @ApiModelProperty(value = "消息类型")
    @TableField("message_type")
    private Integer messageType;

    @ApiModelProperty(value = "消息内容")
    @TableField("message_body")
    private String messageBody;

    @ApiModelProperty(value = "错误信息")
    @TableField("ex_message")
    private String exMessage;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "重发次数")
    @TableField("resend_count")
    private Integer resendCount;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "创建者")
    @TableField(value = "creator", fill = FieldFill.INSERT)
    private String creator;


}
